﻿Imports Mysoft.Map.Data
Imports Mysoft.PubProject.Business

Partial Class BizParamSetting_Import_Special
    Inherits Mysoft.Map.Application.Security.AppPage

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '在此处放置初始化页的用户代码      
        Dim enableQMYS As Boolean
        Select Case Request.QueryString("param").ToUpper()
            Case "cb_ProductProject".ToUpper()   '隐藏grid，显示gridtree,设置xml为标段xml,设置过滤条件
                appGrid.Visible = False
                appGridTree.Visible = True

                appGridTree.Xml = "/PubProject/BizParam/Cbgl/cb_ProductProject.xml"
                appGridMenu.Xml = "/PubProject/BizParam/Cbgl/cb_ProductProject.xml"
                appGridTree.CustomFilter = "BUGUID='" + Request.QueryString("buguid") + "'"
                Exit Select
            Case "cb_TaxSetting".ToUpper()
                appGrid.Xml = "/PubProject/BizParam/Cbgl/cb_TaxSetting.xml"
                appGridMenu.Xml = "/PubProject/BizParam/Cbgl/cb_TaxSetting.xml"
                appGrid.CustomFilter = "BUGUID='" + Request.QueryString("buguid") + "'"
                Exit Select
            Case "cb_FKSPType".ToUpper()
                appGrid.Visible = False
                appGridTree.Visible = True

                appGridTree.Xml = "/PubProject/BizParam/Cbgl/cb_FKSPType.xml"
                appGridMenu.Xml = "/PubProject/BizParam/Cbgl/cb_FKSPType.xml"
                enableQMYS = PublicMNG.IsLicenseApplication("费用预算")
                If Not enableQMYS Then
                    appGridTree.CustomFilter = "(BUGUID='" + Request.QueryString("buguid") + "' AND (FKSPClass = '非合同付款类型' OR FKSPClass='合同付款类型'))" & _
                                            "OR (IsEnd=0 AND (FKSPClass = '非合同付款类型' OR FKSPClass='合同付款类型'))"
                Else
                    appGridTree.CustomFilter = "BUGUID='" + Request.QueryString("buguid") + "' OR IsEnd=0"
                End If

                Exit Select
        End Select
    End Sub

End Class
